# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=sushi
pkgver=3.30.0
pkgrel=2
pkgdesc="A quick previewer for Nautilus"
url="https://gitlab.gnome.org/GNOME/sushi"
arch=(x86_64)
license=(GPL2)
groups=(gnome)
depends=(clutter-gtk clutter-gst gjs libmusicbrainz5 webkit2gtk gtksourceview3 evince)
optdepends=('libreoffice: OpenDocument formats')
makedepends=(intltool gobject-introspection git)
_commit=9178916157fa2cf023610b4695486b570cabdb8a  # tags/3.30.0^0
source=("git+https://gitlab.gnome.org/GNOME/sushi.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  mkdir m4
  intltoolize
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --libexecdir=/usr/lib
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
